<%@ page language="java" isELIgnored="false" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@ include file="/WEB-INF/jsp/ResourceGlobal.jsp"%>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>岗位人员变更新增页面</title>
	<script type="text/javascript">
		var POST_PERSONNEL_CHANGE_ADD_PATH = '<%=context%>business/postMaintenance/';
		$(function () {
			window.postPersonnelChangeAdd = new POST_PERSONNEL_CHANGE_ADD();
		})
	</script>
	<link rel="stylesheet" type="text/css" href="<%=context%>resources/modules/bootstrap/css/plugins/multiselect/multiselect.css" />
</head>
<body class="sub-page">
	<fieldset id="step1">
		<div class="page-content">
			<form name="postPersonnelChangeAddForm" id="postPersonnelChangeAddForm" method="post" action="<%=context%>business/postMaintenance/savePostPersonnelChange.do" class="form-horizontal" role="form">
				<div class="page-body">
					<div class="form-group">
						<label class="col-sm-1 control-label">变更后的岗位人员<span class="text-danger">*</span></label>
						<div class="col-sm-11 form-inner">
							<select class="form-control use-select2 multiple" multiple="multiple" placeholder="变更后的岗位人员" id="newPersonnelId" name="newPersonnelId"></select>
							<input type="hidden" name="oldPersonnelId" id="oldPersonnelId"/>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">变更岗位<span class="text-danger">*</span></label>
						<div class="col-sm-11 form-inner">
							<select class="form-control use-select2" placeholder="变更岗位" name="postId" id="postId">
								<option value=""></option>
								<c:forEach items="${postList }" var="item">
									<wasp:hasPermission id="post_${item.postCode}_edit">
										<option value="${item.postId }&&${item.postRank }">${item.postTitle }</option>
									</wasp:hasPermission>
								</c:forEach>
							</select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">变更生效日<span class="text-danger">*</span></label>
						<div class="col-sm-11 form-inner">
							<input class="form-control white-bg" placeholder="变更生效日" name="effctiveDate" id="effctiveDate" readonly="readonly"></input>
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-12">
							<div class="clearfix form-multi-col-panel" id="multiselect1">
								<div class="form-item-group form-horizontal">
									<div>
										<div class="form-item" id="prjSNameDiv">
											<span class="form-field">产品简称</span>
											<span class="form-input">
												<input class="form-control" placeholder="产品简称" name="prjSName" id="prjSName">
											</span>
								        </div>
										<div class="form-item" style="display: none;" id="companyNameDiv">
											<span class="form-field">管理人名称</span>
											<span class="form-input">
												<input class="form-control" placeholder="管理人名称" name="companyName" id="companyName">
											</span>
								        </div>
										<div class="form-item">
											<span class="form-field">变更前的岗位人员</span>
											<span class="form-input">
												<select class="form-control use-select2" placeholder="变更前的岗位人员" id="oldPersonnelIds" name="oldPersonnelIds"></select>
											</span>
								        </div>
								    </div>
								</div>
							    <div class="form-action">
									<button class="btn btn-primary" id="queryByCondtion" name="queryByCondtion" type="button" onclick="postPersonnelChangeAdd.queryResouceList()">
										<i class="fa fa-search"></i>查询
									</button>
									<button class="btn btn-default" id="reset" name="reset" type="button" onclick="postPersonnelChangeAdd.clearQueryCondition()">清空</button>
								</div>
							</div>
							<div class="multiselect clearfix" id="multiselect">
								<div class="multiselect-options" style="border: 0px; width: 45%;">
									<div class="selected-header">待选资源列表</div>
									<div class="options-body" id="options-body" style="border: 1px solid #e2e2e2;"></div>
								</div>
								<div class="multiselect-actions" style="widty: auto;">
									<a href="javascript:void(0)" class="btn btn-default btn-sm multiselect-goright" title="右移">
										<i class="iconfont icon-jiantouarrow487"></i>
									</a>
									<a href="javascript:void(0)" class="btn btn-default btn-sm multiselect-toright" title="全部右移">
										<i class="iconfont icon-shideright39"></i>
									</a>
									<div>&nbsp;</div>
									<div>&nbsp;</div>
									<a href="javascript:void(0)" class="btn btn-default btn-sm multiselect-goleft" title="左移">
										<i class="iconfont icon-jiantouarrowhead7"></i>
									</a>
									<a href="javascript:void(0)" class="btn btn-default btn-sm multiselect-toleft" title="全部左移">
										<i class="iconfont icon-jiantouarrowheads3"></i>
									</a>
								</div>
								<div class="multiselect-options" style="border: 0px; width: 45%;">
									<div class="selected-header">已选资源列表</div>
									<div class="options-body" id="selected-body" style="border: 1px solid #e2e2e2;"></div>
									<input type="hidden" id="resourceId" name="resourceId"/>
								</div>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">备注： </label>
						<div class="col-sm-11 form-inner">
							<input type="text" placeholder="备注" class="form-control" name="remark" id="remark" value=""/>
						</div>
					</div>
					<div class="page-footer">
						<button id="saveBtn" name="saveBtn" type="button" class="btn btn-primary btn-save btn-loading btn-w-xs" data-loading-text="<i class='ico-loading'></i>" onclick="postPersonnelChangeAdd.comfirm()">确定</button>
						<button type="button" id="cancelBtn" class="btn btn-link btn-w-xs" onclick="window.close();">取消</button>
					</div>
				</div>
			</form>
		</div>
	</fieldset>
	<div id="step2" class="page-content" style="display: none;">
		<div class="modal-body">
			<div class="table-responsive">
				<div>
					<span style="color: red;">（请注意：点击该页面的提交变更之后才会保存。）</span>
				</div>
				<table class="table table-bordered" id="confirmTable" style="margin-bottom: 60px;">
					<tbody>
						<tr id="header">
							<th>资源名称</th>
							<th>岗位</th>
							<th>生效日</th>
							<th>变更前岗位人员</th>
							<th>变更后岗位人员</th>
							<th>备注</th>
						</tr>
					</tbody>
				</table>
				<div style="position: fixed; bottom: 0;width: 93.5%;background: white;padding: 10px;border-radius: 5px;border: 1px solid #fc6821;">
					<button type="button"  id="backSelectbtn" name="backSelectbtn" class="btn btn-link btn-w-xs" value="返 回 " onclick="postPersonnelChangeAdd.backSelect()">返 回</button>
					<button type="button"  data-loading-text="<i class='ico-loading'></i>"  id="sendFlowbtn" name="sendFlowbtn" class="btn btn-primary btn-save btn-loading btn-w-xs" value="提交变更" onclick="postPersonnelChangeAdd.savePostPersonnelChange()">提交变更</button>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript" src="<%=context%>resources/modules/business/postMaintenance/postPersonnelChangeAdd.js?r=<%=Math.random()%>"></script>
</body>
</html>
